﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Adminitrator.master" AutoEventWireup="true" CodeFile="ProductHot.aspx.cs" Inherits="admin_Products_ProductHot" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
      <ContentTemplate>  
  <h1 class="title">
    Cấu hình Sản phẩm nổi bật</h1>
  <div class="search">
    <fieldset class="fieldset">
      <legend>Lọc hiển thị</legend>
      <table width="100%">
        <tr>
          <!-- <td style="width: 357px"> <label>Danh mục sản phẩm</label><asp:DropDownList ID="dropCategorySelect" runat="server" CssClass="dropDown" 
              Width="200px" onselectedindexchanged="dropCategory_SelectedIndexChanged" 
              AutoPostBack="True" /></td>  -->
          <td align="left">
            <label>Tình trạng</label>
             <asp:DropDownList ID="dropIsEnable" runat="server" CssClass="dropDown" 
              Width="100px" AutoPostBack="True" 
              onselectedindexchanged="dropIsEnable_SelectedIndexChanged" >
               <asp:ListItem Value="0">Tất cả</asp:ListItem>
               <asp:ListItem Value="True">Hiển thị</asp:ListItem>
               <asp:ListItem Value="False">Ẩn</asp:ListItem>
            </asp:DropDownList>
          </td>       
        </tr>
      </table>
      </fieldset>
    </div>   
     <div id="gridview">
    <asp:GridView ID="gridView" runat="server" Width="960px" AutoGenerateColumns="False"
      CellPadding="3" EnableModelValidation="True" GridLines="None" AllowPaging="True"
      BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" 
         CellSpacing="1" PageSize="8" 
      OnRowDataBound="gridView_RowDataBound" 
      OnPageIndexChanging="gridView_PageIndexChanging"      
      OnRowDeleting="gridView_RowDeleting" EmptyDataText="Dữ liệu trống !" 
         onrowcommand="gridView_RowCommand1">
      <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
      <HeaderStyle BackColor="#4581BB" Font-Bold="True" ForeColor="#E7E7FF" Height="30px"
        HorizontalAlign="Left" />
      <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" CssClass="page" />
      <RowStyle BackColor="#DEDFDE" ForeColor="Black" CssClass="row-item" />
      <SelectedRowStyle BackColor="#990000" Font-Bold="True" ForeColor="White" Font-Underline="True" />
        <Columns>
          <asp:TemplateField HeaderText="Chọn">
            <ItemTemplate>
              <asp:CheckBox ID="checkBox" runat="server" />
            </ItemTemplate>
            <ItemStyle Width="45px" />
          </asp:TemplateField>
          <asp:BoundField DataField="Id" HeaderText="ID">
          <ItemStyle Width="35px" />
          </asp:BoundField>
          <asp:BoundField DataField="Name" HeaderText="Tên sản phẩm">
          </asp:BoundField>
          <asp:BoundField DataField="CategoryId" HeaderText="Danh mục">
          <ItemStyle Width="120px" />
          </asp:BoundField>
          <asp:ImageField DataImageUrlField="Image" 
            DataImageUrlFormatString="~/Images/Product/{0}" HeaderText="Ảnh">
            <ControlStyle Height="30px" />
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle Height="30px" HorizontalAlign="Center" Width="50px" />
          </asp:ImageField>
           <asp:ButtonField CommandName="Down" ImageUrl="~/Images/icon-down.png">
          <ItemStyle Width="25px" CssClass="linkDown" />
          </asp:ButtonField>
          <asp:ButtonField ImageUrl="~/Images/icon-up.png" CommandName="Up">
          <ItemStyle Width="25px" CssClass="linkUp" />
          </asp:ButtonField>
          <asp:TemplateField HeaderText="Tình trạng">
            <ItemTemplate>
              <asp:Image ID="imgStates" runat="server" />
            </ItemTemplate>
            <ItemStyle Width="80px" />
          </asp:TemplateField>
          
          <asp:TemplateField HeaderText="Xóa">
            <ItemTemplate>
              <asp:LinkButton ID="linkDelete" runat="server" CausesValidation="false" Text="" CssClass="btnDelete"
              CommandName="Delete" OnClientClick="return confirm('Bạn có chắc chắn muốn xóa ?')">
              </asp:LinkButton>
            </ItemTemplate>
            <ItemStyle Width="30px" />
          </asp:TemplateField>
        </Columns>
      </asp:GridView>
               <asp:UpdateProgress ID="UpdateProgress1" runat="server">
          <ProgressTemplate>
             <img src="/CMS_V3/Images/ajax-loader.gif" alt="Loadding" style="position: absolute; top: 50%; left: 50%; z-index: 1000" />
          </ProgressTemplate>
        </asp:UpdateProgress>
    </div>
    <div>
    <table style="width: 100%">
      <tr>
        <td align="left" valign="top">
          <asp:LinkButton ID="LinkButton1" runat="server" Text="" CssClass="button btn-check"
            OnClick="linkCheckAll_Click" />&nbsp; &nbsp; &nbsp;
          <asp:LinkButton ID="LinkButton2" runat="server" Text="" CssClass="button btn-uncheck"
            OnClick="linkUnCheckAll_Click" />
        </td>
        <td align="right">
          <asp:Button runat="server" ID="btnXoaChon" Text="" CssClass="button btn-delete" OnClientClick="return confirm('Bạn có chắc chắn muốn xóa ?')"
            OnClick="btnXoaChon_Click" />
          &nbsp;
          <asp:Button runat="server" ID="btnEnable" Text="" CssClass="button btn-show" OnClick="btnEnable_Click" />&nbsp;
          <asp:Button runat="server" ID="btnVisible" Text="" CssClass="button btn-hidden" OnClick="btnVisible_Click" />
        </td>
      </tr>
    </table>
    <div style="margin: 10px 0px">
    <label>
      Số dòng hiển thị trên 1 trang :
    </label>
    <asp:DropDownList runat="server" ID="dropPageSize" CssClass="dropdown" AutoPostBack="true"
      OnSelectedIndexChanged="dropCountRow_SelectedIndexChanged">
      <asp:ListItem Text=" 10 " Value="10" Selected="True" />
      <asp:ListItem Text=" 20 " Value="20" />
      <asp:ListItem Text=" 30 " Value="30" />
      <asp:ListItem Text=" 50 " Value="50" />
      <asp:ListItem Text=" 100 " Value="100" />
    </asp:DropDownList>
  </div>
  </div>
 
    <div class="detail" style="margin-top: 10px">
    <fieldset class="fieldset">
      <legend>Thêm mới sản phẩm vào danh sách</legend>
      <table style="width: 100%">
      <tr>
         <td style="width: 105px">Danh mục : </td>
          <td><asp:DropDownList ID="dropCategory" runat="server" CssClass="dropDown" 
                  Width="400px" onselectedindexchanged="dropCategory_SelectedIndexChanged1" AutoPostBack="true" /></td>  
      </tr>
        <tr>
          <td style="width: 105px">Chọn sản phẩm : </td>
          <td><asp:DropDownList ID="dropArticle" runat="server" CssClass="dropDown" Width="400px" /></td>          
        </tr>
        <tr>
          <td style="width: 105px">&nbsp;</td>
          <td><asp:Button ID="btnOk" runat="server" Text="" CssClass="button btn-ok"
              onclick="btnOk_Click" />           
          </td>
        </tr>
      </table>
    </fieldset>
  </div>
    <div style="margin-top: 10px">
        <asp:Literal ID="lbThongBao" runat="server" />
    </div>
           </ContentTemplate> 
    </asp:UpdatePanel>
</asp:Content>



